<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>190用lodash和JSON实现深拷贝</title>
  <script src="./js/lodash.js"></script>
</head>

<body>
  <h1>190用lodash和JSON实现深拷贝</h1>
  <script>
    let obj = {
      uname: 'lqj',
      age: 18,
      animal: {
        uname: 'cat'
      }
    }

    let o = _.cloneDeep(obj)

    let o2 = JSON.parse(JSON.stringify(obj))
  </script>
</body>

</html>